package StudyCode.summary.Basic.stringbuilder;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class StringBuilderReverseByAppend {
	public static void main(String[] args) {
		String src = "Hello World By Java.";
		int len = src.length();
		StringBuilder stringBuilder = new StringBuilder(len);
		for (int i = (len - 1); i >= 0; i--) {
			stringBuilder.append(src.charAt(i));
		}
		System.out.println("反转前:" + src);
		System.out.println("反转后:" + stringBuilder.toString());
	}
}
